<?php
//header("Content-type: text/html; charset=utf-8")
class database_access{
    private $server_name;
    private $user_name;
    private $password;
    private $database_name;
//constractor
    function database_access(){
        $this->server_name="localhost";
        $this->user_name="root";
        $this->password="";
        $this->database_name="helwan_hostes";
    }
      // connecting with the data base
    function  connect(){
         $connection=@mysql_connect($this->server_name,$this->user_name,$this->password)or
    die(mysql_error());
   mysql_query('SET CHARACTER SET utf8', $connection); 
   mysql_query('SET collation_connection = utf8_czech_ci', $connection); 
   mysql_query('ALTER DATABASE helwan_hostes CHARACTER SET utf8;', $connection);
   mysql_query('ALTER TABLE student CONVERT TO CHARACTER SET utf8 COLLATE utf8_czech_ci;', $connection);
   mysql_query('ALTER TABLE accounts CONVERT TO CHARACTER SET utf8 COLLATE utf8_czech_ci;', $connection);
mysql_select_db($this->database_name)or die(mysql_error());
}}
?>
